.TH std::filesystem::directory_entry 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::filesystem::directory_entry \- std::filesystem::directory_entry

.SH Synopsis
   Defined in header <filesystem>
   class directory_entry;          \fI(since C++17)\fP

   Represents a directory entry. The object stores a path as a member and may also
   store additional file attributes (hard link count, status, symlink status, file
   size, and last write time) during directory iteration.

.SH Member functions

   constructor          constructs a directory entry
                        \fI(public member function)\fP
   destructor           default destructor
                        \fI(public member function)\fP
.SH Modifiers
   operator=            assigns contents
                        \fI(public member function)\fP
   assign               assigns contents
                        \fI(public member function)\fP
   replace_filename     sets the filename
                        \fI(public member function)\fP
   refresh              updates the cached file attributes
                        \fI(public member function)\fP
.SH Observers
   path                 returns the path the entry refers to
   operator const path& \fI(public member function)\fP
                        checks whether directory entry refers to existing file system
   exists               object
                        \fI(public member function)\fP
   is_block_file        checks whether the directory entry refers to block device
                        \fI(public member function)\fP
   is_character_file    checks whether the directory entry refers to a character device
                        \fI(public member function)\fP
   is_directory         checks whether the directory entry refers to a directory
                        \fI(public member function)\fP
   is_fifo              checks whether the directory entry refers to a named pipe
                        \fI(public member function)\fP
   is_other             checks whether the directory entry refers to an other file
                        \fI(public member function)\fP
   is_regular_file      checks whether the directory entry refers to a regular file
                        \fI(public member function)\fP
   is_socket            checks whether the directory entry refers to a named IPC socket
                        \fI(public member function)\fP
   is_symlink           checks whether the directory entry refers to a symbolic link
                        \fI(public member function)\fP
                        returns the size of the file to which the directory entry
   file_size            refers
                        \fI(public member function)\fP
                        returns the number of hard links referring to the file to which
   hard_link_count      the directory entry refers
                        \fI(public member function)\fP
                        gets the time of the last data modification of the file to
   last_write_time      which the directory entry refers
                        \fI(public member function)\fP
   status               status of the file designated by this directory entry;
   symlink_status       status of the file/symlink designated by this directory entry
                        \fI(public member function)\fP
   operator==
   operator!=
   operator<
   operator<=
   operator>
   operator>=           compares two directory entries
   operator<=>          \fI(public member function)\fP
   (removed in C++20)
   (removed in C++20)
   (removed in C++20)
   (removed in C++20)
   (removed in C++20)
   (C++20)

.SH Non-member functions

   operator<< performs stream output on a directory entry
              \fI(function)\fP

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

      DR    Applied to            Behavior as published              Correct behavior
   LWG 3171 C++17      directory_entry couldn't be inserted by     output enabled again
                       operator<< because of LWG2989
